<!-- Page-Level Scripts -->

function closeLayer() {
    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
    parent.layer.close(index); //再执行关闭
}

$(function () {
    //校验插件
    $("#formobj").Validform({
        tiptype: 4,
        ignoreHidden: true,
        ajaxPost: true,
        btnSubmit: "#btn_sub",
        callback: function (data) {
            var obj = eval(data);
            if (obj.code == '200') {
                window.parent.doSearch();
                closeLayer();
                return true;
            } else {
                tipUtil.msg2Tip(obj.message, "error");
                return false;
            }
        }
    });
});


